<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    575. Distribute Candies
   </h1>
   Given an integer array with
   <b>
    even
   </b>
   length, where different numbers in this array represent different
   <b>
    kinds
   </b>
   of candies. Each number means one candy of the corresponding kind. You need to distribute these candies
   <b>
    equally
   </b>
   in number to brother and sister. Return the maximum number of
   <b>
    kinds
   </b>
   of candies the sister could gain.
   <p>
    <b>
     Example 1:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> candies = [1,1,2,2,3,3]
<b>Output:</b> 3
<b>Explanation:</b>
There are three different kinds of candies (1, 2 and 3), and two candies for each kind.
Optimal distribution: The sister has candies [1,2,3] and the brother has candies [1,2,3], too. 
The sister has three different kinds of candies. 
</pre>
   <p>
    <b>
     Example 2:
    </b>
    <br>
   </p>
   <pre>
<b>Input:</b> candies = [1,1,2,3]
<b>Output:</b> 2
<b>Explanation:</b> For example, the sister has candies [2,3] and the brother has candies [1,1]. 
The sister has two different kinds of candies, the brother has only one kind of candies. 
</pre>
   <p>
    <b>
     Note:
    </b>
   </p>
   <ol>
    <li>
     The length of the given array is in range [2, 10,000], and will be even.
    </li>
    <li>
     The number in given array is in range [-100,000, 100,000].
    </li>
    <ol>
    </ol>
   </ol>
  </div>
  <div>
   <h1 class="question_title">
    575. 分糖果
   </h1>
   <p>
    给定一个
    <strong>
     偶数
    </strong>
    长度的数组，其中不同的数字代表着不同种类的糖果，每一个数字代表一个糖果。你需要把这些糖果
    <strong>
     平均
    </strong>
    分给一个弟弟和一个妹妹。返回妹妹可以获得的最大糖果的种类数。
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre>
<strong>输入:</strong> candies = [1,1,2,2,3,3]
<strong>输出:</strong> 3
<strong>解析: </strong>一共有三种种类的糖果，每一种都有两个。
     最优分配方案：妹妹获得[1,2,3],弟弟也获得[1,2,3]。这样使妹妹获得糖果的种类数最多。
</pre>
   <p>
    <strong>
     示例 2 :
    </strong>
   </p>
   <pre>
<strong>输入:</strong> candies = [1,1,2,3]
<strong>输出:</strong> 2
<strong>解析:</strong> 妹妹获得糖果[2,3],弟弟获得糖果[1,1]，妹妹有两种不同的糖果，弟弟只有一种。这样使得妹妹可以获得的糖果种类数最多。
</pre>
   <p>
    <strong>
     注意:
    </strong>
   </p>
   <ol>
    <li>
     数组的长度为[2, 10,000]，并且确定为偶数。
    </li>
    <li>
     数组中数字的大小在范围[-100,000, 100,000]内。
     <ol>
     </ol>
    </li>
   </ol>
  </div>
 </body>
</html>